/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package teste.utilitario;

import controllers.AtributoAuxController;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import models.entidades.Procedimento;

/**
 *
 * @author Wenderson
 */
public class ManipulaHash {
    
    public static ArrayList<String> list(HashMap<String, String> object, boolean primero) {
        if (object == null || object.isEmpty()) {
            return null;
        }
        
        ArrayList<String> lista = new ArrayList<String>();
        
        for (String valor : object.keySet()) {
            if (primero) {
                lista.add(valor);
            } else {
                lista.add(object.get(valor));
            }
        }
        
        return lista;
    }
    
    public static void main(String[] args) {
        HashMap<String, String> chaves = AtributoAuxController.getChavesReferenciadas(new Procedimento(5, null, null, null, null));
        System.out.println(chaves.toString());
    }
}
